<template>
	
	<view >
		<video  
		class="video" 
		:src="url" 
		:autoplay="true" 
		:controls="false"
		:show-fullscreen-btn="true" 
		:show-snapshot-button="true" 
		:enable-progress-gesture="false"  
		:vslide-gesture-in-fullscreen="true" 
		:show-casting-button="true"  
		:style="{height:height + 'px'}">
			<cover-image class="buttom row" style="width: 100rpx;height: 100rpx;margin: 20rpx;padding: 10rpx;margin-top: 160rpx;border-radius: 100rpx;"  :src="img"></cover-image>
			<cover-view class="buttom row name" >{{name}}</cover-view>
			<cover-view class="buttom row pt" >来自{{ptname}}直播平台</cover-view>
			<cover-view class="buttom row back" @tap="back">退出</cover-view>
		</video>
		
	</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				date: new Date().getTime(),
				url:null,
				name:'',
				ptname:'',
				img:'',
				height:uni.getSystemInfoSync().screenHeight
				
			}
		},
		computed:{
			user(){
				return this.$store.state.Login ? this.$store.state.userinfo : {};
			},
			vip(){
				return this.$store.state.vip;
			},
			vipend(){
				return this.$store.state.vipend;
			},
			oimg(){
				return JSON.parse(this.$store.state.config.oimg);
			},
			follownum(){
				return this.$store.state.follow.length;
			}
		},		
		onLoad(item) {
			this.url = item.url;
			this.name = item.name;
			this.ptname = item.ptname;
			this.img = item.img;
			if(this.vip==0){ 
				 this.showToast('您还不是会员');
					setTimeout(()=>{
				     uni.navigateBack()
			          },500) 
			       }

		},
		methods: {
			back(){
				uni.navigateBack({
					
				})
			}
		}
	}
</script>

<style>
	page{
		margin-left: 0px; 
		margin-top: 0px; 
		margin-right: 0px; 
		margin-bottom: 0px;
		background-color: #000000;
	}
	.video{
		width: 750rpx;
	}
	.name {
		height: 70rpx;
		margin-left: 130rpx;
		border-radius: 50rpx;
		margin-top: 10rpx;
		font-size: 30rpx;
		color: #FFFFFF;
		font-weight: 700;
	}
	.pt {
		line-height: 120rpx;
		margin-left: 130rpx;
		border-radius: 50rpx;
		padding-top: 30rpx;
		font-size: 25rpx;
		color: #FFFFFF;
	}
	.back {
		line-height: 100rpx;
		margin-left: 650rpx;
		text-align: center;
		border-radius: 100rpx;
		padding-top: 2rpx;
		font-size: 25rpx;
		color: #FFFFFF;
		background-color: rgba(225,225,225,0.5);
	}
	.buttom{
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 120rpx;
		padding: 8rpx;
		
	}
</style>
